{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
  <link rel="stylesheet" href="{% static 'plugins/bootstrap-3.4.1-dist/css/bootstrap.css' %}">
    <style>
        .account{
            width: 500px;
            height: 420px;
            border: 1px solid #dddddd;
            margin-left: auto;
            margin-right: auto;
            margin-top: 100px;
            padding: 20px 40px;
            border-radius: 20px;
            box-shadow: 5px 5px 5px #aaa;
        }
        .account h2{
            margin-top: 10px;
            text-align: center;
        }
    </style>
</head>
<body background="{% static "/img/3.jpg" %}"
               style="background-repeat:no-repeat;
               background-attachment:fixed;
               background-size:100% 100%; ">
<div class="account">
<div><h2>用户登录</h2></div>
    <form method="post" novalidate>
        {% csrf_token %}
  <div class="form-group">
    <label for="exampleInputEmail1">用户名</label>
        {{ form.username }}
      <span style="color: red">  {{ form.username.errors.0 }}</span>
  </div>
  <div class="form-group">
    <label for="exampleInputPassword1">密码</label>
     {{ form.password }}
      <span style="color: red">{{ form.password.errors.0 }}</span>
  </div>
   <div class="form-group">
       <label for="id_code">图片验证码</label>
       <div class="row">
           <div class="col-xs-7">
               {{ form.code }}
             <span style="color: red">{{ form.code.errors.0 }}</span>
       </div>
           <div class="col-xs-5">
               <img id="image_code" src="/image/code/">
               <div><span><a href="/login/">点击刷新</a></span></div>
       </div>
   </div>
       </div>
  <button type="submit" class="btn btn-primary">登 录</button>
</form>
</div>
</body>
</html>